package com.topcheer.common.datasource.exception;

import com.topcheer.common.datasource.constants.DataSourceConstants;
import lombok.Data;

/**
 * @ProjectName: cloud-master
 * @Package: com.akt.cloud.common.source.exception
 * @ClassName: NoDataSourceException
 * @Description:
 * @Author: Lix
 * @CreateDate: 2020/3/30 22:19
 * @UpdateUser: 更新者
 * @UpdateDate: 2020/3/30 22:19
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
@Data
public class DataSourceBuilderException extends RuntimeException {

    private int status = 200;

    private DataSourceBuilderException(String message) {
        super(message);
        this.status = DataSourceConstants.EX_NO_DATA_SOURCE_BUILDER_CODE;
    }

    public static DataSourceBuilderException newException(){
        return new DataSourceBuilderException("Data Source Builder Exception !!!");
    }

    public static DataSourceBuilderException newException(String message){
        return new DataSourceBuilderException(message);
    }

}
